package io.renren.modules.biz.entity;

import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.URL;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;

/**
 * 会员表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-09-03 14:51:31
 */
@TableName("tb_member")
public class MemberEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id主键
	 */
	@TableId
	@NotNull(message = "ID不能为空", groups = UpdateGroup.class)
	private Long id;
	/**
	 * 微信openid
	 */
	private String openid;
	/**
	 * 手机号
	 */
	@NotBlank(message = "手机号不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String mobile;
	/**
	 * 昵称
	 */
	@NotBlank(message = "昵称不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String nickname;
	/**
	 * 头像
	 */
	@URL(message = "头像URL地址有误")
	@NotBlank(message = "头像不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String headImg;
	/**
	 * 账号状态 0:禁用 1:正常 2:冻结
	 */
	private Integer status;
	/**
	 * 真实姓名
	 */
	private String realname;
	/**
	 * 银行名称
	 */
	private String bankName;
	/**
	 * 支行名称
	 */
	private String bankNameBranch;
	/**
	 * 银行卡号
	 */
	private String bankCardNumber;
	/**
	 * 支付宝
	 */
	private String alipay;
	/**
	 * 支付宝收款码
	 */
	@URL(message = "支付宝收款码URL地址有误")
	private String alipayImg;
	/**
	 * 微信支付
	 */
	private String wechat;
	/**
	 * 微信收款码
	 */
	@URL(message = "微信收款码URL地址有误")
	private String wechatImg;
	/**
	 * 推荐码
	 */
	private String code;
	/**
	 * 上级推荐人
	 */
	private String recPerson;
	/**
	 * 用户等级
	 */
	private Integer userLevel;
	/**
	 * 账户余额
	 */
	private Double balance;
	/**
	 * 冻结余额
	 */
	private Double blockedBalance;
	/**
	 * 注册IP
	 */
	private String regIp;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新时间
	 */
	private Date updateTime;
	/**
	 * 所在房间
	 */
	private Long roomId;
	/**
	 * 乐观锁标记防止高并发
	 */
	@Version
	private Integer version;
	/**
	 * 最近登录时间
	 */
	private Date lastLoginTime;
	/**
	 * 可提现达标金额
	 */
	private Double withdrawAmountLimit;

	/**
	 * 是否在线
	 */
	@TableField(exist = false)
	private Boolean online;

	/**
	 * 设置：id主键
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 获取：id主键
	 */
	public Long getId() {
		return id;
	}

	/**
	 * 设置：微信openid
	 */
	public void setOpenid(String openid) {
		this.openid = openid;
	}

	/**
	 * 获取：微信openid
	 */
	public String getOpenid() {
		return openid;
	}

	/**
	 * 设置：手机号
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * 获取：手机号
	 */
	public String getMobile() {
		return mobile;
	}

	/**
	 * 设置：昵称
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	/**
	 * 获取：昵称
	 */
	public String getNickname() {
		return nickname;
	}

	/**
	 * 设置：头像
	 */
	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	/**
	 * 获取：头像
	 */
	public String getHeadImg() {
		return headImg;
	}

	/**
	 * 设置：账号状态 0:禁用 1:正常 2:冻结
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * 获取：账号状态 0:禁用 1:正常 2:冻结
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * 设置：真实姓名
	 */
	public void setRealname(String realname) {
		this.realname = realname;
	}

	/**
	 * 获取：真实姓名
	 */
	public String getRealname() {
		return realname;
	}

	/**
	 * 设置：银行名称
	 */
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	/**
	 * 获取：银行名称
	 */
	public String getBankName() {
		return bankName;
	}

	/**
	 * 设置：支行名称
	 */
	public void setBankNameBranch(String bankNameBranch) {
		this.bankNameBranch = bankNameBranch;
	}

	/**
	 * 获取：支行名称
	 */
	public String getBankNameBranch() {
		return bankNameBranch;
	}

	/**
	 * 设置：银行卡号
	 */
	public void setBankCardNumber(String bankCardNumber) {
		this.bankCardNumber = bankCardNumber;
	}

	/**
	 * 获取：银行卡号
	 */
	public String getBankCardNumber() {
		return bankCardNumber;
	}

	/**
	 * 设置：支付宝
	 */
	public void setAlipay(String alipay) {
		this.alipay = alipay;
	}

	/**
	 * 获取：支付宝
	 */
	public String getAlipay() {
		return alipay;
	}

	/**
	 * 设置：支付宝收款码
	 */
	public void setAlipayImg(String alipayImg) {
		this.alipayImg = alipayImg;
	}

	/**
	 * 获取：支付宝收款码
	 */
	public String getAlipayImg() {
		return alipayImg;
	}

	/**
	 * 设置：微信支付
	 */
	public void setWechat(String wechat) {
		this.wechat = wechat;
	}

	/**
	 * 获取：微信支付
	 */
	public String getWechat() {
		return wechat;
	}

	/**
	 * 设置：微信收款码
	 */
	public void setWechatImg(String wechatImg) {
		this.wechatImg = wechatImg;
	}

	/**
	 * 获取：微信收款码
	 */
	public String getWechatImg() {
		return wechatImg;
	}

	/**
	 * 设置：推荐码
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * 获取：推荐码
	 */
	public String getCode() {
		return code;
	}

	/**
	 * 设置：上级推荐人
	 */
	public void setRecPerson(String recPerson) {
		this.recPerson = recPerson;
	}

	/**
	 * 获取：上级推荐人
	 */
	public String getRecPerson() {
		return recPerson;
	}

	/**
	 * 设置：用户等级
	 */
	public void setUserLevel(Integer userLevel) {
		this.userLevel = userLevel;
	}

	/**
	 * 获取：用户等级
	 */
	public Integer getUserLevel() {
		return userLevel;
	}

	/**
	 * 设置：账户余额
	 */
	public void setBalance(Double balance) {
		this.balance = balance;
	}

	/**
	 * 获取：账户余额
	 */
	public Double getBalance() {
		return balance;
	}

	/**
	 * 设置：冻结余额
	 */
	public void setBlockedBalance(Double blockedBalance) {
		this.blockedBalance = blockedBalance;
	}

	/**
	 * 获取：冻结余额
	 */
	public Double getBlockedBalance() {
		return blockedBalance;
	}

	/**
	 * 设置：注册IP
	 */
	public void setRegIp(String regIp) {
		this.regIp = regIp;
	}

	/**
	 * 获取：注册IP
	 */
	public String getRegIp() {
		return regIp;
	}

	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * 设置：更新时间
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 获取：更新时间
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	/**
	 * 设置：所在房间
	 */
	public void setRoomId(Long roomId) {
		this.roomId = roomId;
	}

	/**
	 * 获取：所在房间
	 */
	public Long getRoomId() {
		return roomId;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public Double getWithdrawAmountLimit() {
		return withdrawAmountLimit;
	}

	public void setWithdrawAmountLimit(Double withdrawAmountLimit) {
		this.withdrawAmountLimit = withdrawAmountLimit;
	}

	public Boolean getOnline() {
		return online;
	}

	public void setOnline(Boolean online) {
		this.online = online;
	}
}
